package com.bwie.controller;

import com.bwie.pojo.TbActive;
import com.bwie.service.TbActiveService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: badaotianqiong
 * @Date: 2025/8/1 13:07
 * @Description:
 **/
@RestController
@RequestMapping("/product/index")
public class ActiveController {
    @Autowired
    public TbActiveService tbActiveService;

    @PostMapping("getActiveListList")
    public R getActiveListList(@RequestBody PageInfoVo pageInfoVo){
        return tbActiveService.getActiveListList(pageInfoVo);
    }

    @PostMapping("addactive")
    public R addactive(@RequestBody @Validated TbActive tbActive){
        return tbActiveService.addactive(tbActive);
    }
}
